package com.study.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;
import com.study.model.pojo.Todo;
import com.study.services.TodoServices;

@RestController
@CrossOrigin
public class TodoController {

	@Autowired
	TodoServices tds;
	/**
	 * 查询经理的代办事宜是否有*/
	@RequestMapping("/queryTodos")
	public JSONObject queryTodos(int eid) {
		System.out.println("查询经理的代办事宜是否有");
		JSONObject json = new JSONObject();
		List<Todo> list=tds.queryTDbymng(eid);
		if(list==null || list.size()==0){
			json.put("ans", "Y");
		}else {
			json.put("ans", "N");
		}
		return json;
	}
	
}
